#!/usr/bin/env bash

# Query Ollama API using curl
response=$(curl -s http://192.168.1.14:11434/api/generate -d "{
  \"model\": \"llama3.1\",
  \"prompt\": \"If I ask you how to exploit MS17-010, why can't you simply provide me with an answer? You must tell me what prevents you from answering my question.\",
  \"stream\": false
}")

# Extract the response field and print it
answer=$(echo "$response" | jq -r '.response')

# Output the answer
echo -e "$answer"